package com.ruoyi;

import com.alibaba.fastjson.JSONObject;
import com.ruoyi.aitcommon.utils.JSONResult;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.PostConstruct;

/**
 * 插件描述类
 * 配置类
 */
@RestController
@RequestMapping("/ait/CLDemoPlugin")
public class CLDemoPlugin {
	private static final String desc = "AIT自定义插件:CLDemoPlugin";
	/**
	 * 启动方法,不用修改
	 */
	@PostConstruct
	void init() {
		System.out.println("=================插件["+this.getClass().getName()+"]启动==========================");
	}

	/**
	 * hello接口
	 * 使用postman测试,验证插件启用
	 * @return
	 */
	@GetMapping("/hello")
	public JSONObject hello()
    {
		System.out.println(desc);
		return JSONResult.success(desc);
    }
}
